Returns time in requested format.

<div class="definition">
    formatTime(dateStr, format)
</div>

<div class="arguments">
    <table>
    <tr>
        <td>dateStr</td>
        <td><b>string</b> or <b>number</b>, date in common format</td>
    </tr>
    <tr>
        <td>format</td>
        <td><b>string</b>, format to output</td>
    </tr>
    </table>
</div>

The <span class="argument">str</span> argument can be (1) a JavaScript Date, (2) a Unix epoch, (3) any standard date, which 
will be used to create JavaScript Date object. To ensure correct translation it is best to pass a JavaScript Date. 
<div style="height: 20px;"></div>

The format can contain following elements: 
<ul>
    <li><div style="display: inline-block; width: 50px">hh</div> - hour</li>
    <li><div style="display: inline-block; width: 50px">hhh</div> - hour with leading 0</li>
    <li><div style="display: inline-block; width: 50px">h24</div> - hour in 24 hour format</li>
    <li><div style="display: inline-block; width: 50px">hh24</div> - hour in 24 hour format with a leading 0</li>
    <li><div style="display: inline-block; width: 50px">mi</div> - minute (always with a leading 0)</li>
    <li><div style="display: inline-block; width: 50px">mm</div> - minute (always with a leading 0)</li>
    <li><div style="display: inline-block; width: 50px">ss</div> - second (always with a leading 0)</li>
    <li><div style="display: inline-block; width: 50px">am</div> - am or pm for US format</li>
    <li><div style="display: inline-block; width: 50px">pm</div> - am or pm for US format</li>
</ul>

<textarea class="javascript">
var a = w2utils.formatTime((new Date()), 'hh:mi:ss am');
console.log(a);
</textarea>